/*
 * @Author: sjt
 * @Date: 2022-08-08 17:09:24
 * @LastEditors: sjt
 * @LastEditTime: 2024-09-29 10:54:58
 * @Description: file content
 * @FilePath: \易拓\sj-board\src\router\index.js
 */
import { createRouter, createWebHashHistory } from 'vue-router'
import Home from '../views/Home.vue'

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    redirect: '/page_1',
    children: [
      {
        path: 'page_1',
        name: 'page_1',
        meta: {
          index: 0,
          background: 1
        },
        component: () => import('@/views/page1/index.vue')
      },
      {
        path: 'page_2',
        name: 'page_2',
        meta: {
          index: 1,
          background: 2
        },
        component: () => import('@/views/page2/index.vue')
      }
    ]
  }
]

const router = createRouter({
  history: createWebHashHistory('/'),
  routes
})

export default router
